package com.qf.scheduled;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;
@Component
public class ScheduledTest {

    @Scheduled(cron = "0/2 * * * * ?")
    public void scheduledMethod(){
        System.out.println("scheduled被触发"+new Date());

    }
}
